# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Compute.V1.Model.StoragePoolDisk do
  @moduledoc """


  ## Attributes

  *   `attachedInstances` (*type:* `list(String.t)`, *default:* `nil`) - [Output Only] Instances this disk is attached to.
  *   `creationTimestamp` (*type:* `String.t`, *default:* `nil`) - [Output Only] Creation timestamp in RFC3339 text format.
  *   `disk` (*type:* `String.t`, *default:* `nil`) - [Output Only] The URL of the disk.
  *   `name` (*type:* `String.t`, *default:* `nil`) - [Output Only] The name of the disk.
  *   `provisionedIops` (*type:* `String.t`, *default:* `nil`) - [Output Only] The number of IOPS provisioned for the disk.
  *   `provisionedThroughput` (*type:* `String.t`, *default:* `nil`) - [Output Only] The throughput provisioned for the disk.
  *   `resourcePolicies` (*type:* `list(String.t)`, *default:* `nil`) - [Output Only] Resource policies applied to disk for automatic snapshot creations.
  *   `sizeGb` (*type:* `String.t`, *default:* `nil`) - [Output Only] The disk size, in GB.
  *   `status` (*type:* `String.t`, *default:* `nil`) - [Output Only] The disk status.
  *   `type` (*type:* `String.t`, *default:* `nil`) - [Output Only] The disk type.
  *   `usedBytes` (*type:* `String.t`, *default:* `nil`) - [Output Only] Amount of disk space used.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :attachedInstances => list(String.t()) | nil,
          :creationTimestamp => String.t() | nil,
          :disk => String.t() | nil,
          :name => String.t() | nil,
          :provisionedIops => String.t() | nil,
          :provisionedThroughput => String.t() | nil,
          :resourcePolicies => list(String.t()) | nil,
          :sizeGb => String.t() | nil,
          :status => String.t() | nil,
          :type => String.t() | nil,
          :usedBytes => String.t() | nil
        }

  field(:attachedInstances, type: :list)
  field(:creationTimestamp)
  field(:disk)
  field(:name)
  field(:provisionedIops)
  field(:provisionedThroughput)
  field(:resourcePolicies, type: :list)
  field(:sizeGb)
  field(:status)
  field(:type)
  field(:usedBytes)
end

defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.StoragePoolDisk do
  def decode(value, options) do
    GoogleApi.Compute.V1.Model.StoragePoolDisk.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.StoragePoolDisk do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
